<%@ include file="inc/init.jsp" %>

<html>
	<head>
		<title>
			Graduate Admission System | University of California - San Diego | 
			Login 
		</title>
		<link type="text/css" rel="stylesheet" href="<%= BASE %>css/main.css">
		<script type="text/javascript" src="<%= BASE %>js/msg.js"></script>
	</head>
	<body <%

		/** Show javascript messages **/
	
		if(request.getParameter("login") != null)
		{
			out.println("onload = \"info(201, 6, " + BASE + ")\"");
		}
		
		if(request.getParameter("msg") != null)
		{
			int msg = Integer.parseInt(request.getParameter("msg"));
			out.println("onload = \"info(" + msg + ", 6, " + BASE + ")\"");
		}

	%>>
		<div class="header-top"></div>
		<div class="header">
			<a href="index.jsp"><img src="<%= BASE %>img/logo.png"></a>
		</div>
		<div class="content">
		<div id="message"></div>
		
		<h2>Welcome to the UC San Diego Graduate Admission System.</h2>
		
		Login with your account to apply or register <a href="<%= BASE %>registration.jsp">here</a>.<br><br>
		
		<form method="POST" action="j_security_check">
			<table>
				<tr><td>User name:</td><td><input name="j_username"></td>
					<td rowspan="2">&nbsp;<img src="<%= BASE %>img/key.png"></td>
				</tr>
				<tr><td>Password:</td><td><input type="password" name="j_password"></td></tr>
				<tr><td colspan="2" align="right"><input type="submit" value="Login"></td></tr>
			</table>
		</form>
		</div>
	</body>
</html>